/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.pig4cloud.pigx.wallet.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.pig4cloud.pigx.common.customize.utils.serializer.BigDecimalToPlainStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 合约账户明细
 *
 * @since 2022/9/13 14:37
 */
@Data
public class ContractAccountDetailVO implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@ApiModelProperty("主键")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;

	/**
	 * 货币名称
	 */
	@ApiModelProperty("货币名称")
	private String curName;

	/**
	 * 业务类型（0已实现盈亏、1资金费用、2手续费、3爆仓清算、4持仓保证金）
	 * <p>持仓保证金目前不记录，也不显示
	 */
	@ApiModelProperty("业务类型（0已实现盈亏、1资金费用、2手续费、3爆仓清算）")
	private String businessType;

	/**
	 * 操作类型（0冻结、1解冻、2增加、3减少）
	 */
	@ApiModelProperty("操作类型（0冻结、1解冻、2增加、3减少）")
	private String operationType;

	/**
	 * 金额
	 */
	@ApiModelProperty("金额")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal amount;

	/**
	 * 币对名称
	 */
	@ApiModelProperty("币对名称")
	private String symbolName;

	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime createTime;
}
